package org.jeecg.modules.miniAppCustomerEndPoint.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.miniAppCustomerEndPoint.entity.JxUserCouponDo;
import org.jeecg.modules.platformMasterEndPoint.entity.JxCouponDo;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

public interface JxUserCouponMapper extends BaseMapper<JxUserCouponDo> {

    List<HashMap<String,Object>> queryNewUserCouponPackage(@Param("siteId") String siteId, @Param("userId") String userId);

    List<JxCouponDo> queryAvaliableCouponsByStoreId(@Param("siteId") String siteId, @Param("storeId") String storeId, @Param("nowDateTime") LocalDateTime nowDateTime);

    List<HashMap<String, Object>> queryAllAvailableCoupons(@Param("siteId") String siteId, @Param("userId") String userId, @Param("nowDateTime") String nowDateTime);

    Integer queryUsedOrExpiredCouponsPageInfo(@Param("userId") String userId, @Param("nowDateTime") String nowDateTime);

    List<HashMap<String, Object>> queryUsedOrExpiredCoupons(@Param("userId") String userId, @Param("nowDateTime") String nowDateTime,
                                                            @Param("offset") Integer offSet, @Param("limit") Integer limit);

}
